 ListEx Help Contents

The Contents lists Help topics available for ListEx.  Use the scroll bar to see entries not currently visible in the Help window.

To learn how to use Help, press F1 or choose Using Help from the Help menu

ListEx

Properties

Requirements for Using ListEx

Registering


  ListEx: Properties

In addition to standard ListBox control properties, the ListEx control has the following extra properties:

About

HScroll

ImageOffset

ItemBackColor

ItemForeColor

ItemDefHeight

ItemFont

ItemImage

NumTabs

SelectEnable

SelectStyle

TabStops

TextOffset

VerticalImageAlign

VerticalTextAlign


  ListEx Properties: About

About tells you the version number of the control and how to contact the author.


  ListEx Properties: HScroll

Hscroll allows you to automatically add a horizontal scroll bar to a single column listbox.  ListEx keeps track of the longest entry in the list and when Hscroll is set to True, a horizontal scroll bar will appear to allow you to scroll to the end of the string.  Setting Hscroll to False removes the horizontal scroll bar.


  ListEx Properties: ImageOffset

ImageOffset is the distance in pixels from the left edge of the list box to start drawing the image.

ImageOffset affects all items in the list.


  ListEx Properties: ItemBackColor

ItemBackColor allows you to set the BackColor of individual items in the list.


  ListEx Properties: ItemForeColor

ItemForeColor allows you to set the ForeColor of individual items in the list.


  ListEx Properties: ItemDefHeight

ItemDefHeight allows you to set the height of individual items in the list.  This value must be in Pixels.

The default height is 16 pixels.  If you change the Font Size, you should change the ItemDefHeight property as well.  ListEx will not automatically size the item height if the font changes.  The following code shows how to determine the ItemDefHeight for a given font size:

ListEx1.Font.Size = 12

Form1.Font.Size = 12

ListEx1.ItemDefHeight = Form1.TextHeight(“gM”) + 4

If Columns is set for multi-column or if the IntegralHeight property is set to True  the ItemDefHeight can not be set at run time and must be set from the properties window.


 ListEx Properties: ItemFont

ItemFont allows you to set the font of each individual items in the list.  It is set just like a standard Font value:

With ListEx.ItemFont(Index)

.Bold = True/False

.Italic = True/False

.Name = “fontname”

.Size = Value

.StrikeThrough = True/False

.Underline = True/False

.Weight = Value

End With

ListEx uses the standard Font (for each ListEx control) to set each item by default.


 ListEx Properties: ItemImage

ItemImage allows you to display Bitmaps, Icons, or Windows Metafiles in individual items in the list.  You can use either LoadPicture or the Picture property of any control:

ListEx1.ItemImage(0) = LoadPicture("myicon.ico")

or

ListEx1.ItemImage(0) = Picture1.Picture


  ListEx Properties: NumTabs

NumTabs is the number of tab stops that are to be set in the list box.


  ListEx Properties: SelectEnable

SelectEnable allows you to set whether or not a particular item in the list can be highlighted.  Setting SelectEnable to FALSE for an item causes a focus rectangle to be drawn when that item is selected.  SelectEnable does not affect the Selected property.  Selected will still show TRUE for that item if it is selected.


  ListEx Properties: SelectStyle

SelectStyle can be set to the following values:

0 - Invert	Invert the item when selected

1 - Standard	Use the standard system colors COLOR_HIGHLIGHTTEXT and COLOR_HIGHLIGHT to highlight the selection

If you are using colors other than the standard system colors in the list

box, you should set SelectStyle to 0.


  ListEx Properties: TabStops

TabStops hold the individual tab stops that are to be set in the list box.  The values are always in Pixels.  Setting the value to a negative number causes the text to be right-aligned on that stop.


  ListEx Properties: TextOffset

TextOffset is the distance from the left edge of the list box (not from the image) to place the text.  It is possible to place text over an image.  TextOffset only applies if there is an image in the item.  This value is always in Pixels.


ListEx Properties: VerticalImagetAlign
  ListEx Properties: VerticalImageAlign

VerticalImageAlign can be set to the following values:

0 - Top

1 - Centered

2 - Bottom

VerticalImageAlign is for setting the vertical alignment of images within each item of the list box.


  ListEx Properties: VerticalTextAlign

VerticalTextAlign can be set to the following values:

0 - Top

1 - Centered

2 - Bottom

VerticalTextAlign is for setting the vertical alignment of text within each item of the list box.


 ListEx: Registering

The cost to register ListEx.OCX is $15.  You can register with a VISA, MASTERCARD, American Express, or Discover card or by contacting me at:

E-Mail: 	joe@jcoconsulting.com

Web:	http://jcoconsulting.com

LISTEX.OCX is intended to be registered to individuals.  Any company wishing to register LISTEX.OCX would need to register one copy for each person using it.  Registered users can freely distribute LISTEX.OCX in any application.  There are no license fees or royalties.

A VBX version of ListEx is also available for $11.


 ListEx: Requirements for Using ListEx

To use ListEx, place the files LISTEX.OCX and LISTEX.LIC in your Windows\System directory.  Then use REGSVR32.EXE C:\WINDOWS\SYSTEM\LISTEX.OCX to register it.  If you load the VB project, ListEx will self-register in whatever directory it is in.  If you move it later, you will need to re-register it.

If you decide to register, I will send you LISTEX.OCX without the nag window in it.  When you get it, copy it over the old file or unregister the old one, delete it, and then register the new one.  The file LISTEX.LIC must be in the same directory as LISTEX.OCX.  Do not distribute LISTEX.LIC with any of your applications.

LISTEX.OCX also requires MFC40.DLL.  MFC40.DLL should be installed before LISTEX.OCX when you distribute any applications.


 ListEx Help